<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script src="../js/vue.js"></script>
		<div id="app">

			<span v-if="isUser">
				<label for="userName">用户账号：</label>
				<input id="userName" placeholder="用户账号" />
			</span>
			<span v-else>
				<label for="userEmail">用户邮箱：</label>
				<input id="userEmail" placeholder="用户邮箱" />
			</span>
			<button @click="change">切换类型</button>
		</div>
		<script>
			var app = new Vue({
				el: '#app',
				data: {
					isUser: true
				},
				methods: {
					change(){
						this.isUser=!this.isUser
					}
				}
			})
		</script>
	</body>
</html>
